﻿<%@ Page Language="C#" AutoEventWireup="true" enableEventValidation="false" CodeFile="UpdateFlowStepInputs.aspx.cs" Inherits="UpdateFlowStepInputs" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <base target="_self"></base>

          <link rel="Stylesheet" type="text/css" href="../../Styles/right_style.css" />
          <script type="text/javascript" src="../../Scripts/jquery.ui/js/jquery.js"></script>

         <style type="text/css">
            <!--
            html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
            scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
            -->
        </style>

</head>
<%     
        Response.Buffer = true;
        Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
        Response.Expires = 0;
        Response.CacheControl = "no-cache";   
%>
<body>
    <form id="form1" runat="server">
            <div class="sub_right_top">
<div class="hdm_footer">
    <div class="fabu_gg_title" style="margin-left:29px;"> <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="14px" ForeColor="Black"></asp:Label></div> 
      <table width="480" border="0" align="center" cellpadding="0" cellspacing="0" >
            <tr>
              <td width="230" align="center">本步骤可选字段</td>
              <td width="20">&nbsp;</td>
              <td width="230" align="center">备选字段</td>
            </tr>
            <tr>
              <td width="230" align="center">
                <asp:ListBox ID="lbManageInputs" runat="server" Height="250px" SelectionMode="Multiple"
                                    Width="150px" Font-Size="12px"></asp:ListBox>
              </td>
              <td width="20"><p>
                <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/to_1l.gif"
                                    OnClientClick="addOption();return false;" />
              </p>
                <p>&nbsp;</p>
                <p>
                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/to_1r.gif"
                                    OnClientClick="delOption();return false;" />
                </p></td>
              <td width="230" align="center">
                  <asp:ListBox ID="lbInputs" runat="server" Height="250px" SelectionMode="Multiple"
                                    Width="150px" Font-Size="12px"></asp:ListBox>
                </td>
            </tr>
            <tr>
              <td width="230" align="center">
                <asp:Button ID="Button1" runat="server" OnClientClick="selectAll('lbManageInputs');return false;"
                                    Text="" CssClass="com_all_button"/>
              </td>
              <td width="20">&nbsp;</td>
              <td width="230" align="center">
                        <asp:Button ID="Button3" runat="server" OnClientClick="selectAll('lbInputs');return false;"
                                    Text="" CssClass="com_all_button"/>         
                 </td>
            </tr>
            <tr>
              <td colspan="3" align="center">
                <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" OnClientClick="selectAll('lbManageInputs');"
                                    Text="" CssClass="queding_anniu"/>
                <asp:Button ID="btnBack" runat="server" OnClick="btnBack_Click" Text="" CausesValidation="False" CssClass="fanhui_anniu"/>
              </td>
        </tr>
      </table>
    <div style="height:15px; overflow:hidden;"></div>
  </div>
</div>

    </form>
</body>
</html>
<script language="javascript" type="text/javascript">
var item=document.getElementById('lbInputs');
var setitem=document.getElementById('lbManageInputs');
function addOption()
{
    var arrayValue=new Array();
    for(var i=0;i<item.length;i++)
    {
        if(item.options[i].selected)
        {
            var opt=new Option(item.options[i].text,item.options[i].value);
            setitem.options[setitem.length]=opt;
            arrayValue.push(item.options[i].value);
        }
    }
    for(var i=0;i<arrayValue.length;i++)
    {
        for(var j=0;j<item.length;j++)
        {
            if(item.options[j].value==arrayValue[i])
            {
                item.options[j]=null;
            }
        }
    }
}
function delOption()
{
    var arrayValue=new Array();
    for(var i=0;i<setitem.length;i++)
    {
        if(setitem.options[i].selected)
        {
            var opt=new Option(setitem.options[i].text,setitem.options[i].value);
            item.options[item.length]=opt;
            arrayValue.push(setitem.options[i].value);
        }
    }
    for(var i=0;i<arrayValue.length;i++)
    {
        for(var j=0;j<setitem.length;j++)
        {
            if(setitem.options[j].value==arrayValue[i])
            {
                setitem.options[j]=null;
            }
        }
    }
}
function selectAll(items)
{
    var itemss= document.getElementById(items);
    for(var i=0;i<itemss.options.length;i++)
    {
        itemss.options[i].selected=true;
    }
}
</script>